package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Page;
import org.jsola.core.Result;
import org.jsola.hr.dto.CrmCustomerInfoAddDTO;
import org.jsola.hr.dto.CrmCustomerInfoUpdateDTO;
import org.jsola.hr.query.CrmCustomerInfoQuery;
import org.jsola.hr.query.CrmMemberQuery;
import org.jsola.hr.vo.CrmCustomerInfoListVO;
import org.jsola.hr.vo.CrmCustomerInfoVO;
import org.jsola.hr.vo.CrmMemberVO;

import java.util.List;

/**
 * 客户详情表
 *
 * @author zhr
 */
@Api(tags = "hr-客户详情表")
public interface ICrmCustomerInfoControllerAPI {

    /**
     * 客户详情
     * @param crmCustomerInfoQuery 客户详情表查询参数
     * @return 客户详情VO
     */
    @ApiOperation(value="客户详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmCustomerInfoQuery", dataType = "CrmCustomerInfoQuery", value = "客户详情表查询参数", paramType = "query")
    })
    Result<CrmCustomerInfoVO> queryCustomerInfo(CrmCustomerInfoQuery crmCustomerInfoQuery);

    /**
     * 新增客户
     * @param crmCustomerInfoAddDTO 客户详情表新增实体
     * @return 客户详情表展示对象
     */
    @ApiOperation(value = "新增客户")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmCustomerInfoAddDTO", dataType = "CrmCustomerInfoAddDTO", value = "新增客户详情表", paramType = "body")
    })
    Result<CrmCustomerInfoVO> saveCustomer(CrmCustomerInfoAddDTO crmCustomerInfoAddDTO);

    /**
     * 客户列表分页list
     * @param crmCustomerInfoQuery 客户详情表查询参数
     * @return page
     */
    @ApiOperation(value="分页查询客户详情表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmCustomerInfoQuery", dataType = "CrmCustomerInfoQuery", value = "客户详情表查询参数", paramType = "query")
    })
    Result<Page<CrmCustomerInfoListVO>> getCustomerPage(CrmCustomerInfoQuery crmCustomerInfoQuery);

    /**
     * 批量分配
     * @param crmCustomerInfoUpdateDTO 客户详情表
     * @return 更新数量
     */
    @ApiOperation(value = "批量分配")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmCustomerInfoUpdateDTO", dataType = "CrmCustomerInfoUpdateDTO", value = "修改客户详情表", paramType = "body")
    })
    Result<Integer> batchDistribution(CrmCustomerInfoUpdateDTO crmCustomerInfoUpdateDTO);

    /**
     * 新增客户详情表
     * @param crmCustomerInfoAddDTO 客户详情表新增实体
     * @return 客户详情表展示对象
     */
    @ApiOperation(value = "新增客户详情表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmCustomerInfoAddDTO", dataType = "CrmCustomerInfoAddDTO", value = "新增客户详情表", paramType = "body")
    })
    Result<CrmCustomerInfoVO> save(CrmCustomerInfoAddDTO crmCustomerInfoAddDTO);


    /**
     * 修改客户详情表
     * @param crmCustomerInfoUpdateDTO 客户详情表
     * @return 更新数量
     */
    @ApiOperation(value = "修改客户详情表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmCustomerInfoUpdateDTO", dataType = "CrmCustomerInfoUpdateDTO", value = "修改客户详情表", paramType = "body")
    })
    Result<Integer> update(CrmCustomerInfoUpdateDTO crmCustomerInfoUpdateDTO);




    /**
     * 删除单个客户详情表，彻底删除
     * @param crmCustomerInfoId 客户详情表id
     * @return 删除数量
     */
    @ApiOperation(value="删除单个客户详情表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmCustomerInfoId", dataType = "String", value = "客户详情表id", paramType = "path")
    })
    Result<Integer> delete(String crmCustomerInfoId);


    /**
     * 批量删除客户详情表，彻底删除
     * @param crmCustomerInfoIds 客户详情表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除客户详情表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmCustomerInfoIds", dataType = "String[]", value = "客户详情表id数组", paramType = "body" ,allowMultiple = true)
    })
    Result<Integer> deleteBatch(String[] crmCustomerInfoIds);


    /**
     * 根据客户详情表id查询客户详情表详情
     * @param crmCustomerInfoId 客户详情表id
     * @return 客户详情表详情
     */
    @ApiOperation(value="根据客户详情表id查询客户详情表详情")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmCustomerInfoId", dataType = "String", value = "客户详情表id", paramType = "path")
    })
    Result<CrmCustomerInfoVO> findById(String crmCustomerInfoId);


    /**
     * 查询客户详情表
     * @param crmCustomerInfoQuery 客户详情表查询参数
     * @return page
     */
    @ApiOperation(value="查询客户详情表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmCustomerInfoQuery", dataType = "CrmCustomerInfoQuery", value = "客户详情表查询参数", paramType = "query")
    })
    Result<List<CrmCustomerInfoListVO>> listAll(CrmCustomerInfoQuery crmCustomerInfoQuery);


     /**
     * 分页查询客户详情表
     * @param crmCustomerInfoQuery 客户详情表查询参数
     * @return page
     */
    @ApiOperation(value="分页查询客户详情表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "crmCustomerInfoQuery", dataType = "CrmCustomerInfoQuery", value = "客户详情表查询参数", paramType = "query")
    })
    Result<Page<CrmCustomerInfoListVO>> page(CrmCustomerInfoQuery crmCustomerInfoQuery);


}

